<!-- 用户组统计 -->
		  <section class="panel">
					  <header class="panel-heading bm0">
						   <span class='span-title'>网站信息统计</span>
						   <span class="tools pull-right"><a href="javascript:;" class="iconpx-chevron-down"></a></span>
					  </header>
					  <div class="panel-body laery-seo-box">
							<div class="larry-seo-stats" id="larry-seo-stats"></div>
					  </div>
		  </section>
<script type="text/javascript" src="__STATIC__/larry_layui/jsplug/echarts.min.js"></script>
<!--<script type="text/javascript" src="__STATIC__/larry_layui/js/main.js"></script>-->
<script type="text/javascript">
{php}
$array = [];
$_array = query('memberdata',['group'=>'groupid','field'=>['count(uid)'=>'NUM','groupid']]);
foreach($_array AS $rs){
	$array[$rs['groupid']] = $rs['NUM'];
}
$group_array = getGroupByid();
{/php}
var myChart = echarts.init(document.getElementById('larry-seo-stats'));
option = {
    title : {
        text: '用户组成员统计',
        subtext: '按用户组来统计',
        x:'center'
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['{:implode("','",$group_array)}']
    },
    series : [
        {
            name: '用户比例',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
			{volist name="group_array" id="rs"}
                {value:{$array[$key]|default=0}, name:'{$rs}'},
			{/volist}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
myChart.setOption(option);
</script>